package com.zpkj.portal.interceptor;

import java.io.PrintWriter;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.view.AbstractView;

/**
 * json输出格式化
 * @author admin
 *
 */
public class JsonView extends AbstractView {

	@Override
	protected void renderMergedOutputModel(Map<String, Object> parameters, 
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		response.setContentType("text/json; charset=UTF-8");
		PrintWriter out = response.getWriter();
		out.print(parameters.get("result"));
	}
}
